System and method for managing applications

ABSTRACT

A system for managing a application includes a clock unit outputting time signals, a storage unit storing an age table, a detection unit and a resetting unit. The application includes a logical pointer and a flag carrying a flag bit. The age table includes ordered logical headers and age values, each logical header associated with an age value, the logical pointer pointing to one logical header, the age value having an increment as the logical pointer moves forward along the logical headers. The detection unit receives the time signals and reads the flag bit and moves the logical pointer to a succeeding logical header with a first step if the flag bit changes and with a second step if the flag bit remains unchanged during interval between two time signals. The second step is larger than the first step. The resetting unit resets the flag bit.

BACKGROUND

1. Technical Field

The disclosure relates to application management, and particularly, to asystem and a method for managing applications.

2. Description of the Related Art

In an intelligent robot system, numerous applications are designed togive the robot physiological functions, such as walking, running, andtalking. As robotic technology progresses, morefunctionality/applications are added to the original system, previousfunctionality/applications may be redundant because they may never beused and thus add bulk to the operating software and may even slow downthe robot system. As a result, manual deletion and/or management of theapplications are required, which is inconvenient.

What is needed, therefore, is to provide a system and a method formanaging applications.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a functional blocks diagram of a system for managingapplications according to an exemplary embodiment.

FIG. 2 is a flowchart of a method for managing applications.

DETAILED DESCRIPTION OF THE EMBODIMENTS

All of the processes described below may be embodied in, and fullyautomated via, software code modules executed by one or more generalpurpose computers or processors. The code modules may be stored in anytype of computer-readable medium or other computer storage device. Someor all of the methods may alternatively be embodied in specializedcomputer hardware.

Referring to FIG. 1, a system 10 for managing applications includes aclock unit 110, a storage medium 120, a first detection unit 130, asecond detection unit 140, and a resetting unit 150.

The clock unit 110 is configured for outputting a number of sequentialpredetermined time signals. The time interval between two sequentialtime signals can be a fixed value or may be changeable during use. Theclock unit 1110 can be a reference clock of a device (e.g., a robot)where the system is used.

The storage medium 120 stores a number of applications P_(i) and an agetable (see Table 1). Each application P_(i) includes a logical pointerand a flag F_(i), where i and j are natural numbers. The flag F_(i) isconfigured for carrying a flag bit indicative of the executable statusof the corresponding application. For example, if the flag bit of flagF_(i) is ‘0’, it indicates that the corresponding application P_(i) hasnever been executed. If the flag bit of flag F_(i) is ‘1’, it indicatesthat the corresponding application P_(i) has been executed. All flagbits are initially set to ‘0’. The age table includes a collection oflogical headers PT₁, PT₂, . . . , PT_(j) and a collection of agingvalues O₁, O₂, . . . , O_(j), wherein each logical header PT_(j) isassociated with an aging value O_(j). The aging value represents the ageof the application P_(i). The greater the aging value O_(j) is, theolder the application P_(i) will be.

In Table 1, the collection of the logical headers PT₁, PT₂, . . . ,PT_(j) is an increasing collection, and correspondingly, the collectionof the aging values O₁, O₂, . . . , O_(j) is an increasing collection.All logical pointers of the applications P₁, P₂, . . . , P_(i) initiallypoint to the logical header PT₁. That is, initial aging values of allthe applications P₁, P₂, . . . , P_(i) are set as the aging value O₁, asshown in Table 1.

TABLE 1 Logical Header Aging Value PT₁ O₁ PT₂ O₂ PT₃ O₃ . . . . . .PT_(j) O_(j)

The first detection unit 130 is configured for receiving thepredetermined time signals at a first frequency and reading the flag bitof the flag to check which flag bit has changed into ‘1’. Applicationswith a changed flag bit ‘1’ are considered to be executed applicationsduring two received sequential time signals, and consequently, thelogical pointers thereof are moved by the first detection unit 130 to asucceeding header with a first predetermined step, e.g., to the logicalheader PT₂ with one step. The aging values corresponding to theseexecuted applications are changed to a succeeding aging value, e.g., theaging value O₂.

The second detection unit 140 is configured for receiving thepredetermined time signals at a second frequency and reading the flagbit of the flag to check which flag bits remain unchanged, wherein thesecond frequency is no greater than the first frequency. The detectionprinciple of the second detection unit 140 is substantially the same asthat of the first detection unit 130. The difference is that the logicalpointers of all unexecuted applications that have been detected aremoved by the second detection unit 140 to a succeeding header with asecond predetermined step, where the second predetermined step is largerthan the first predetermined step. As a result, the unexecutedapplications during two received sequential time signals, by the seconddetection unit 140, age faster than those that have been executed.

The resetting unit 150 is configured for resetting the flag bits of theapplications P_(i) after all flag bits of the applications P_(i) areread.

The second detection unit 140 is further configured for detectingwhether the aging values associated with the logical headers pointed toby the logical pointers of the applications are greater than apredetermined aging value after movement of the logical pointers of theapplications, and configured for deleting the applications when theaging values are greater than the predetermined aging value. Therefore,applications that are unused are purged.

Following are examples for a better understanding of the above mentionedsystem.

An age table used in the examples is shown as Table 2. The number ofapplications installed in the device where the system 10 is used isthree, represented as application P₁, application P₂, and applicationP₃. The predetermined aging value is set to 60. The first frequency isone every two days, while the second frequency is one every four days.Initially, the logical pointers of the applications P₁, P₂, P₃ arepointed to the logical header PT₁, which indicates the initial age ofthe applications P₁, P₂, P₃ is 10, as shown in Table 2.

TABLE 2 Logical Header Aging Value PT₁ 10 PT₂ 20 PT₃ 30 PT₄ 40 PT₅ 50PT₆ 60 PT₇ 70

The first detection unit 130 receives the predetermined time signalevery two days and reads the flag bit of each flag. In this example, theflag bit of a flag F₁ of the application P₁ is changed to ‘1’ during tworeceived sequential predetermined time signals. Therefore, the firstdetection unit 130 moves the logical pointer of the application P₁ to asucceeding logical header PT₂ with one step. Subsequently, the age ofthe application P₁ is changed from 10 to 20.

The second detection unit 140 receives the predetermined time signalevery four days and reads the flag bit of each flag. In this example,the flag bits of flags F₂, F₃ of applications P₂, P₃ is “0”. Therefore,the second detection unit 140 moves the logical pointers of theapplications P₂, P₃ to a succeeding logical header PT₃ with two steps.Subsequently, the age of the applications P₂, P₃ is changed from 10 to30. After the movement of the logical pointers of the applications P₁,P₂, P₃, the second detection unit 140 further detects whether the agingvalues associated with the logical headers pointed to by the logicalpointers of the applications P₁, P₂, P₃ are greater than 60. If so, theapplications with an age greater than 60 are deleted by the seconddetection unit 140.

After all flag bits are read, the resetting unit 150 resets the flagbits of flags F₁, F₂, F₃ of the applications P₁, P₂, P₃ to ‘0’.

In other embodiments, the storage unit may store a application or thesystem may include a detection unit configured for receiving thepredetermined time signals and reading the flag bit of the flag atpredetermined time signals and moving the logical pointer to asucceeding logical header with a first predetermined step if the flagbit changes and moving the logical pointer to a different logical headerwith a second predetermined step if the flag bit remains “0” during theinterval between two predetermined time signals, where the secondpredetermined step is larger than the first predetermined step.

Referring to FIG. 2, a method for managing applications includes step210 through step 260. Step 210: outputting a number of sequential timesignals. Step 220: receiving the predetermined time signals at a firstfrequency and reading the flag bit of each flag and moving the logicalpointers of the applications with flag bits that have changed during theinterval between two received sequential time signals to a succeedinglogical header with a first predetermined step. Step 230: receiving thepredetermined time signals at a second frequency and reading the flagbit of each flag and moving the logical pointers of the applicationswith flag bits that remain unchanged during the interval between tworeceived sequential time signals to a succeeding logical header with asecond predetermined step. The second predetermined step is larger thanthe first predetermined step and the second frequency is no greater thanthe first frequency. Step 240: resetting the flag bit of theapplications after all flag bits are read. Step 250: detecting whetherthe aging values associated with the logical headers pointed to by thelogical pointers of the applications are greater than a predeterminedaging value after movement of the logical pointers of the applications.Step 260: deleting the applications when the aging values are greaterthan the predetermined aging value.

In summary, the system and method can move logical pointers ofapplications when the applications have been unexecuted during tworeceived sequential time signals with a step longer than that with whichthe applications have been executed during two received sequential timesignals. As a result, the unused applications during two receivedsequential time signals age faster than those that have been used.Furthermore, when the aging values of the applications are greater thana predetermined aging value, the system can delete the applications.Therefore, applications that are unused may be discarded.

It is to be understood, however, that even though numerouscharacteristics and advantages of the present invention have been setforth in the foregoing description, together with details of thestructure and function of the invention, the disclosure is illustrativeonly, and changes may be made in detail, especially in matters of shape,size, and arrangement of parts within the principles of the invention tothe full extent indicated by the broad general meaning of the terms inwhich the appended claims are expressed.

1. A system for managing a plurality of applications, each applicationcomprising a logical pointer and a flag, the flag being configured forcarrying a flag bit indicative of an executable status of theapplication, the system comprising: a clock unit configured foroutputting a plurality of sequential predetermined time signals; astorage medium storing an age table, the table comprising a collectionof logical headers and a collection of aging values, wherein eachlogical header is associated with an aging value, the logical pointerpointing to one of the logical headers, the age value having apredetermined increment as the logical pointer moves forward along theordered logical headers; a first detection unit configured for receivingthe predetermined time signals at a first frequency and reading the flagbit of each flag and moving the logical pointers of the applicationswith flag bits that have changed during the interval between tworeceived sequential time signals to a succeeding logical header with afirst predetermined step; a second detection unit configured forreceiving the predetermined time signals at a second frequency andreading the flag bit of each flag and moving the logical pointers of theapplications with flag bits that have remained unchanged during theinterval between two received sequential time signals to a succeedinglogical header with a second predetermined step, wherein the secondpredetermined step is larger than the first predetermined step and thesecond frequency is no greater than the first frequency; a resettingunit configured for resetting the flag bit of the applications after allflag bits are read.
 2. The system as claimed in claim 1, wherein thesecond detection unit is further configured for detecting whether theaging values associated with the logical headers pointed to by thelogical pointers of the applications are greater than a predeterminedaging value after movement of the logical pointers of the applications,and configured for deleting the applications when the aging values aregreater than the predetermined aging value.
 3. A method of managingapplications installed into a system, the system comprising a storagemedium storing an age table, each application comprising a logicalpointer and a flag, the flag being configured for carrying a flag bitindicative of an executable status of the application, the tablecomprising a collection of logical headers and a collection of agingvalues, wherein each logical header is associated with an aging value,the logical pointer pointing to one of the logical headers, the agevalue having a predetermined increment as the logical pointer movesforward along the ordered logical headers, the method comprises:outputting a plurality of sequential predetermined time signals;receiving the predetermined time signals at a first frequency andreading the flag bit of each flag and moving the logical pointers of theapplications with flag bits that have changed during the intervalbetween two received sequential time signals to a succeeding logicalheader with a first predetermined step; receiving the predetermined timesignals at a second frequency and reading the flag bit of each flag andmoving the logical pointers of the applications with flag bits that haveremained unchanged during the interval between two received sequentialtime signals to a succeeding logical header with a second predeterminedstep, wherein the second predetermined step is larger than the firstpredetermined step and the second frequency is no greater than the firstfrequency; and resetting the flag bits of the applications after allflag bits are read.
 4. The method as claimed in claim 3, furthercomprising: detecting whether the aging values associated with thelogical headers pointed to by the logical pointers of the applicationsare greater than a predetermined aging value after movement of thelogical pointers of the applications, and; deleting the applicationswhen the aging values are greater than the predetermined aging value. 5.A system for managing a application, the application comprising alogical pointer and a flag, the flag being configured for carrying aflag bit indicative of an executable status of the application, thesystem comprising: a clock unit for outputting a plurality of subsequentpredetermined time signals; a storage unit storing an age table, the agetable comprising a collection of ordered logical headers and acollection of age values, where each logical header is associated withan age value, the logical pointer pointing to one of the logicalheaders, the age value having a predetermined increment as the logicalpointer moves forward along the ordered logical headers; a detectionunit configured for receiving the predetermined time signals and readingthe flag bit of the flag and moving the logical pointer to a succeedinglogical header with a first predetermined step if the flag bit changesand with a second predetermined step if the flag bit remains unchangedduring the interval between two predetermined time signals, where thesecond predetermined step is larger than the first predetermined step;and a resetting unit configured for frequently resetting the flag bitafter reading the flag bit of the flag.